package cn.brilliantfuture.commentry.profile;

import java.io.IOException;

import org.apache.log4j.Logger;

/**
 * 
 * Title: Communication Entry
 * 
 * Author: LiTian
 * 
 * Date: 2011-10-25
 * 
 * Description: 读取系统配置文件
 * 
 */
public class CommEntryProfile extends DefaultProfile {
	private static Logger logger = Logger.getLogger(CommEntryProfile.class.getName());
	private static CommEntryProfile instance = null;
	private static final String PROFILE_PATH = "/commentry.properties";
	public static final String ADCP_SERVICE_IP = "adcp_service_ip";
	public static final String ADCP_SERVICE_PORT = "adcp_service_port";
	public static final String WEATHER_SERVICE_IP = "weather_service_ip";
	public static final String DELIVERY_ZH_SMS = "delivery_zh_sms";
	public static final String DELIVERY_EN_SMS = "delivery_en_sms";

	private CommEntryProfile() {

	}

	public synchronized static CommEntryProfile getInstance() throws IOException {
		logger.info("getInstance() : Init config message ...");
		if (null == instance)
			instance = new CommEntryProfile();
		instance.load(PROFILE_PATH);
		return instance;
	}
}
